FROM mcr.microsoft.com/dotnet/aspnet:6.0-buster-slim AS base
WORKDIR /app
EXPOSE 80

FROM mcr.microsoft.com/dotnet/sdk:6.0-buster AS build
WORKDIR .
COPY . .

FROM build AS publish
WORKDIR "/src/AbpZero.HttpApi.Host"
RUN dotnet publish "AbpZero.HttpApi.Host.csproj" -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "AbpZero.HttpApi.Host.dll"]
